package main

import (
	"log"
	"net/http"
)

func main() {
	log.Print("hello!world!")

	http.Handle("/jquery-ui/", http.FileServer(http.Dir("static")))
	http.Handle("/css/", http.FileServer(http.Dir("static")))
	http.Handle("/js/", http.FileServer(http.Dir("static")))
	http.Handle("/img/", http.FileServer(http.Dir("static")))

	http.HandleFunc("/admin", adminHandler)
	http.HandleFunc("/login", loginHandler)
	http.HandleFunc("/index", indexHandler)
	http.HandleFunc("/xmadmin/xm_lyfj", xm_lyfjHandler)
	http.HandleFunc("/xmadmin/xm_lyfj/ajax_lyfjs", xm_ajax_lyfjs_Handler)
	http.HandleFunc("/xmadmin/xm_lyfj/ajax_get_delete_modal_body", xm_ajax_get_delete_modal_body_Handler)
	http.HandleFunc("/", NotFoundHandler)
	err := http.ListenAndServe(":80", nil)
	if err != nil {
		log.Fatal("ListenAndServer:", err)
	}
}
